#/bin/bash
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
cd "$SHELL_FOLDER"


if [ "$1" = "idc" ]; then
    echo "init_idc"
    echo "cp ./vimrc_idc ~/"
    mv ~/.vimrc ~/.vimrc_back
    mv ~/.vim ~/.vim_back

    echo"tar fzf "
    tar zvfx fzf.tar.gz


    echo "clone plugin"
    ln -s ~/data/rob/robvimsetting/vim ~/.vim
    ln -s ~/data/rob/robvimsetting/vimrc_idc ~/.vimrc
    ln -s ~/data/rob/robvimsetting/fzf ~/.fzf
    #find -name ".git_back" | sed 'p;s/\.git_back/\.git/' | xargs -n2 mv

    echo "install fzf"
     ~/.fzf/install

     echo "install ag"
    yum install epel-release
    yum install the_silver_searcher
    echo "install plugin"
    #vim +PlugInstall +qall; echo $?

    source ~/.bashrc
fi
